<?php
/**
 * Created by PhpStorm.
 * User: 84071
 * Date: 2018-02-23
 * Time: 9:51
 */
namespace app\Common\validate;
use think\Validate;
class Advertising extends Validate{
    protected $rule =   [
        'title'  => 'require',

        'status'  => 'require|number',

        'seetype'  => 'require|number',

        '__token__' => 'token',
    ];

    protected $message  =   [
        'title.require' => '广告名称不得为空！',
        'status.require' => '请选择是否启用！',
        'status.number' => '是否启用选择错误！',
        'seetype.require' => '请选择广告类型！',
        'seetype.number' => '广告类型选择错误！',
        '__token__.token' => '已超时，请重试！',

    ];
    protected $scene = [
        'add' => ['title','status','seetype','__token__'],
    ];
}